www.gusucode.com > 茶都拼客网全功能版 8 > 茶都拼客网全功能版 8.8源码程序/teasdxmccom/茶都拼客网V8.8(全功能,无限制,完全开源)/admin/shangjia_list.asp

    <!--#include file="../Ku_inc/Ku_sql.asp"-->
<!--#include file="../Ku_inc/Ku_config.asp"-->
<!--#include file="Ku_conn.asp"-->
<!--#include file="../Ku_inc/Ku_md5.asp"-->
<!--#include file="../Ku_inc/inc.asp"-->
<!-- #include file="Session.asp"-->
<html>
<head>
<title>商家列表</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="include/style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
input{
	height:22px;
	border:1px solid #BEBEBE;
	background-color:#FFF;
	padding-top: 2px;
	padding-right: 8px;
	padding-bottom: 0pt;
	padding-left: 3px;
}
-->
</style>
</head>
<body>
<script language="JavaScript" type="text/javascript">
function checkall(form)
{
for (var i=0;i<form.elements.length;i++)    {
var e = form.elements[i];
if (e.name != 'chkall') e.checked = form.chkall.checked; 
}
}
</script>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
  <td height="30" style="border: 1px solid #D0D4D9" bgcolor="#EEEEEE"><b> 当前栏目:&gt;</b> 商家管理</td>
  </tr>
</table>
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
  <tr>
    <td width="30%">
   
	<input class="input_back" type="button" name="Submit0" value="管理首页"onclick="location.href='main.asp'"/></td>
    <td width="30%">
   <p align="center">
   <script language="javascript">
	function selectjump(welcomeshengbuy)
	{
		window.location.href('shangjia_list.asp?id='+welcomeshengbuy);
	}
</script>
    </td>
<form method="post" action="?" name="myKeyword">
    <td width="40%">
    <div align="right">搜索:
        <input name="myKeyword" type="text" id="myKeyword" value="" style="WIDTH:30%" maxlength="50">
        <input type="submit" name="Submit" value="搜索(S)" class="input_back">
    </div>
    </td>
    </form>
  </tr>

<form action="deal_shangjia.asp?action=del" method=post name="thisform">
<tr>
<td colspan="3"><table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="cecfce">
<tr>
<td width="20" bgcolor="e7ebef" style="font-weight: bold"><div align="center">选择</div></td>  
<td width="80" height="25" bgcolor="e7ebef" style="font-weight: bold" align="center">商店名(等级)</td>
<td width="60" height="25" bgcolor="e7ebef" style="font-weight: bold" align="center">商家分类</td>
<td width="40" bgcolor="e7ebef" style="font-weight: bold"><div align="center">联系人</div></td>  
<td width="50" bgcolor="e7ebef" style="font-weight: bold"><div align="center">电话</div></td>
<td width="80" bgcolor="e7ebef" style="font-weight: bold"><div align="center">地址</div></td>
<td width="80" bgcolor="e7ebef" style="font-weight: bold"><div align="center">区域</div></td>
<td width="40" bgcolor="e7ebef" style="font-weight: bold"><div align="center">创建者(会员)</div></td>  
<td width="40" bgcolor="e7ebef" style="font-weight: bold"><div align="center">审核</div></td>  
<td  bgcolor="e7ebef" style="font-weight: bold"><div align="center">操作</div></td>

<%
shangjiaid=request.querystring("id")
	set rs=server.createobject("adodb.recordset")
	if userid=0 or userid=6 or userid=7 then
	sql="select * from Shangjia where 1=1"
	end if
	if userid=1 then
	sql="select * from Shangjia where shenhe=1 and 1=1"
	end if
	if userid=2 then
	sql="select * from Shangjia where shenhe=0 and 1=1"
	end if
	if userid=3 then
	sql="select * from Shangjia where uservip=1 and 1=1"
	end if	
	if userid=4 then
	sql="select * from Shangjia where sex=1 and 1=1"
	end if	
	if userid=5 then
	sql="select * from Shangjia where sex=0 and 1=1"
	end if	
			

	
	
	if not (Trim(Request("pageID"))="" or isempty(Trim(Request("pageID"))) ) then
		sql=sql&" and pageID="&clng(Request("pageID"))&""
	end if

	if not (Trim(Request("myKeyword"))="" or isempty(Trim(Request("myKeyword"))) ) then
		sql=sql&" and (name like '%" & Trim(Request("myKeyword")) & "%' or address like  '%" & Trim(Request("myKeyword")) & "%')"
	end if
	if userid=6 then
	sql=sql&" order by loginhits desc"
	end if
	if userid=7 then
	sql=sql&" order by jifen desc"
	end if	
	if userid<6 then
	sql=sql&" order by addtime desc"
	end if
	
	'response.write sql
	'response.End
	rs.open sql,conn,1,1
	
	dim a
	Set a=New PageList
	listLimit=15
	'模拟分页一页显示分页数
	pageLists=5
	'设置分页参数

If rs.BOF or rs.EOF Then 
%>
</tr>
<tr bgcolor="#C6E3F4">
  <td height="28" colspan="9" align="center" bgcolor="#FFFFFF">暂无商家信息记录!</td>
  </tr>
<%
else

'分页循环开始
totalList=rs.recordcount
a.InitPara=array(totalList,listLimit,pageLists)
a.PageList()
rs.pagesize=listLimit
page = request("page")
If page="" Then
	page=1
End If
rs.absolutepage = page
for i=1 to rs.pagesize
%>
<tr bgcolor="#ffffff" onMouseOver='this.style.backgroundColor="#F6f6f6"' 
onMouseOut='this.style.backgroundColor="#FAFAFA"'>
<td height="28" align="center"><input type="checkbox" name="ID" value="<%=Trim(rs("ID"))%>"></td>
<td align="center">
<%=Trim(rs("name"))%>
<!--商家等级-->
<% if rs("xinyu")=0 then%>
<img border="0" src="../pkxx-img/sj01.gif" alt="普通商家">
<% end if%>
<% if rs("xinyu")=1 then%>
<img border="0" src="../pkxx-img/sj02.gif" alt="联盟商家">
<% end if%>
<% if rs("xinyu")=2 then%>
<img border="0" src="../pkxx-img/sj03.gif" alt="VIP商家">
<% end if%> 

<!--商家等级-->
</td>
<td align="center">
<!--商家分类-->
<%  
    set fl=server.createobject("adodb.recordset")
    sqlql="select * from shangjia_kind where id="&rs("class")&""
    fl.open sqlql,conn,1,3   
%>
<%=fl("name")%>
<!--商家分类-->
</td>
<td align="center">
<!--联系人-->
<%=Trim(rs("username"))%>
<!--联系人-->
</td>
<td align="center"><%=Trim(rs("tel"))%></td>
<td align="center"><%=Trim(rs("address"))%></td>
<td align="center">
<!--所属区域-->
<%
dim rsclass,sqlclass
set rsclass=server.createobject("adodb.recordset")
sqlclass = "select * from Gu_qu"
rsclass.open sqlclass,conn,1,1
%>
<%
sqlclass = "select * from Gu_shi"
rsclass.open sqlclass,conn,1,1
if rsclass.eof and rsclass.bof then
response.write "请先添加分类。"
response.end
else
%>
<%
set rsk1=server.createobject("adodb.recordset")
    sqlk1="select * from Gu_shi where id="&rs("shi")
    rsk1.open sqlk1,conn,1,3	 %>
    <%
set rsk2=server.createobject("adodb.recordset")
    sqlk2="select * from Gu_qu where id="&rs("qu")
    rsk2.open sqlk2,conn,1,3	 %>
<%
end if
rsclass.close
%>
<%if rsk1("class1")<>"" then%>
<font color="#FF0000"><%=trim(left(rsk1("class1"),5))%>-<%=trim(left(rsk2("class2"),5))%></font>
<%end if%>
<%if rsk1("class1")="" then%>
<font color="#999999">未选所属区域</font>
<%end if%>
<!--所属区域-->
</td>
<td align="center">
<!--创建者-->
<%  
    set hy=server.createobject("adodb.recordset")
    sqlql="select * from Ku_user where id="&rs("userid")&""
    hy.open sqlql,conn,1,1    
%>
<%=Trim(hy("username"))%>
<!--创建者-->
</td>
<td align="center">
<!--是否审核-->
<%if Trim(rs("shenhe"))=1 then%>
<a href="deal_shangjia.asp?action=noshenhe&id=<%=rs("id")%>" title="取消审核"><font color="#0000ff">已审核</font></a>
<%end if%>
<%if Trim(rs("shenhe"))=0 then%>
<a href="deal_shangjia.asp?action=shenhe&id=<%=rs("id")%>" title="通过审核"><font color="#FF0000">未审核</font></a>
<%end if%>
<!--是否审核-->
</td>
<td align="center">
<!--操作修改-->
<a href="?action=editshangjia&id=<%=rs("id")%>">编辑</a>
<!--操作修改-->
</td>


</tr>
<%
rs.movenext
if rs.eof then exit for
next
end if
%>
</table></td>
  </tr>
  <tr>
    <td colspan="3"><div align="left">
          <input type=checkbox name=chkall value=on onClick="checkall(this.form)">全部选中<input type=submit name=action onClick="{if(confirm('确定删除选中的商家纪录吗?')){this.document.thisform.submit();return true;}return false;}" value="批量删除(Del)" class="input_back">
    </div></td>
  </tr>
  <tr>
    <td colspan="3"><p align="center"><%=a.PageInfo%></td>
  </tr>
  <tr>
    <td colspan="3"></td>
  </tr>
 </form>
</table>
<%
rs.close
set rs=nohing
%>

<br>
<%
if request("action")="xinyu" then
id=request("id")
    set rs=server.createobject("adodb.recordset")
    sql="select * from Shangjia where id="&id
    rs.open sql,conn,1,3
    xinyu=rs("xinyu")
%>
<table width="94%" border="0" align="center" cellpadding="0" cellspacing="0">
<form method="POST" action="Deal_shangjia.asp?act=exinyu&id=<%=id%>">
  <tr>
  <td height="30" style="border: 1px solid #D0D4D9" bgcolor="#EEEEEE" align=center> <b>&nbsp;商家名称</b>:<font color="#FF0000"><%=rs("username")%></font>
    |  当前商家等级:<%=xinyu%>  |  修改为:<input type="text" name="xinyu" size="5" value="<%=xinyu%>" maxlength="1"> 
<input type="submit" value="修改等级" >
<br>“o”=普通商家,“1”=联盟商家,“2”=VIP商家
</td></form>
  </tr>
</table>
<%end if%>

<%
if request("action")="editshangjia" then
id=request("id")
    set rs=server.createobject("adodb.recordset")
    sql="select * from Shangjia where id="&id
    rs.open sql,conn,1,3
    xinyu=rs("xinyu")
%>
<form method="POST" action="Deal_shangjia.asp?act=editshangjia&id=<%=id%>">
<table width="94%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
  <td height="30" style="border: 1px solid #D0D4D9" bgcolor="#EEEEEE" align=center>
<div align="center">
	<table border="0" width="100%" id="table1" height="507" cellpadding="0" cellspacing="1" bgcolor="#E6E6E6">
		<tr>
			<td bgcolor="#FFFFFF" height="38" width="100%" colspan="2">
			<p align="center"><b>修 改 商 家 店 铺 信 息</b></td>
		</tr>
		<tr>
			<td bgcolor="#FFFFFF" width="10%" align="right"><b>商家名称:</b></td>
<td bgcolor="#FFFFFF" width="90%"><input type="text" name="name" size="30" value="<%=rs("name")%>">
* <% if rsq("xinyu")>0 then%>
[审核状态:<% if rs("shenhe")=0 then%>正在审核中!<% end if%><% if rs("shenhe")=1 then%>已通过审核!<% end if%>]
<% end if%>
</td>
		</tr>
		<tr>
			<td bgcolor="#FFFFFF" width="10%" align="right"><b>商家分类:</b></td>
<td bgcolor="#FFFFFF" width="90%">
<%  
    set fl=server.createobject("adodb.recordset")
    sqlql="select * from shangjia_kind where id="&rs("class")&""
    fl.open sqlql,conn,1,3   
%>
<select name="class">
			<option value="<%=fl("id")%>"><%=fl("name")%></option>
		  <% set crs=server.createobject("adodb.recordset")
		  csql="select * from shangjia_kind where id<>"&rs("class")&" order by id"
		  crs.open csql,conn,1,1
		  do while not crs.eof
		  %>
	      <option value="<%=crs("id")%>"><%=crs("name")%></option>
		  <% crs.movenext
		     loop
			 crs.close
			 set crs=nothing
		  %>
	      </select>
*</td>
		</tr>
		<tr>
			<td bgcolor="#FFFFFF" width="10%" align="right"><b>商家等级:</b></td>
<td bgcolor="#FFFFFF" width="90%">
当前等级:
<% if rs("xinyu")=0 then%>
<img border="0" src="../pkxx-img/sj01.gif"><font color="#999999">普通商家(本站会员享受9.5折)</font>
<% end if%>
<% if rs("xinyu")=1 then%>
<img border="0" src="../pkxx-img/sj02.gif"><font color="#FF00FF">联盟商家(本站会员享受9折)</font>
<% end if%>
<% if rs("xinyu")=2 then%>
<img border="0" src="../pkxx-img/sj03.gif"><font color="#FF0000">VIP商家(本站会员享受最低折扣)</font>
<% end if%>

<br>&nbsp;点击选择:
<% if rs("xinyu")=0 then%>
<input type="radio" value="0" name="R1" checked onclick="radioClick(this);"><img border="0" src="../pkxx-img/sj01.gif">
<font color="#999999">普通商家</font>
<input type="radio" value="1" name="R1" onclick="radioClick(this);"><img border="0" src="../pkxx-img/sj02.gif">
<font color="#FF00FF">联盟商家</font>
<input type="radio" value="2" name="R1" onclick="radioClick(this);"><img border="0" src="../pkxx-img/sj03.gif">
<font color="#FF0000">VIP商家</font>
<script type="text/javascript">
var R1="";
function radioClick(node){
R1=this.value;
}
</script>
<% end if%>
<% if rs("xinyu")=1 then%>
<input type="radio" value="0" name="R1" onclick="radioClick(this);"><img border="0" src="../pkxx-img/sj01.gif">
<font color="#999999">普通商家</font>
<input type="radio" value="1" name="R1" checked onclick="radioClick(this);"><img border="0" src="../pkxx-img/sj02.gif">
<font color="#FF00FF">联盟商家</font>
<input type="radio" value="2" name="R1" onclick="radioClick(this);"><img border="0" src="../pkxx-img/sj03.gif">
<font color="#FF0000">VIP商家</font>
<script type="text/javascript">
var R1="";
function radioClick(node){
R1=this.value;
}
</script>
<% end if%>
<% if rs("xinyu")=2 then%>
<input type="radio" value="0" name="R1" onclick="radioClick(this);"><img border="0" src="../pkxx-img/sj01.gif">
<font color="#999999">普通商家</font>
<input type="radio" value="1" name="R1" onclick="radioClick(this);"><img border="0" src="../pkxx-img/sj02.gif">
<font color="#FF00FF">联盟商家</font>
<input type="radio" value="2" name="R1" checked onclick="radioClick(this);"><img border="0" src="../pkxx-img/sj03.gif">
<font color="#FF0000">VIP商家</font>
<script type="text/javascript">
var R1="";
function radioClick(node){
R1=this.value;
}
</script>
<% end if%>
</td>
		</tr>
		<tr>
			<td bgcolor="#FFFFFF" width="10%" align="right"><b>商家LOGO:</b></td>
<td bgcolor="#FFFFFF" width="90%"><input type="text" name="logo" size="60" value="<%=rs("logo")%>" maxlength="80">
*</td>
		</tr>
		<tr>
			<td bgcolor="#FFFFFF" width="10%" align="right"><b>商家简介:</b></td>
<td bgcolor="#FFFFFF" width="90%">
<textarea rows="5" name="beizhu" cols="60"><%=rs("beizhu")%></textarea>*</td>
		</tr>
		<tr>
			<td bgcolor="#FFFFFF" width="10%" align="right"><b>商家公告:</b></td>
<td bgcolor="#FFFFFF" width="90%">
<textarea rows="8" name="gonggao" cols="30"><%=rs("gonggao")%></textarea>*</td>
		</tr>
		<tr>
			<td bgcolor="#FFFFFF" width="10%" align="right"><b>联系人:</b></td>
<td bgcolor="#FFFFFF" width="90%"><input type="text" name="username" size="28" value="<%=rs("username")%>" maxlength="10">
*</td>
		</tr>
		<tr>
			<td bgcolor="#FFFFFF" width="10%" align="right"><b>联系电话:</b></td>
<td bgcolor="#FFFFFF" width="90%"><input type="text" name="tel" size="28" value="<%=rs("tel")%>" maxlength="12">
*</td>
		</tr>
		<tr>
			<td bgcolor="#FFFFFF" width="10%" align="right"><b>联系地址:</b></td>
<td bgcolor="#FFFFFF" width="90%"><input type="text" name="address" size="42" value="<%=rs("address")%>" maxlength="55">
*</td>
		</tr>
		<tr>
			<td bgcolor="#FFFFFF" width="10%" align="right"><b>执行操作:</b></td>
<td bgcolor="#FFFFFF" width="90%"><input type="submit" value="确认修改" ></td>
		</tr>
           </table>
</div>
     </td>
  </tr>
</table>
</form>
<%end if%>
<hr/>
<p align="center"><!-- #include file="Ku_bottom.asp"--></p>
</body>
</html>